package com.example.springBootweb.quartz;

import java.util.Date;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class QuartzUtil {

	@Scheduled(fixedRate=2000)//两秒执行一次
    public void sum() throws InterruptedException{
        System.out.println("结束 当前时间:"+new Date());
    }
}
